<HTML><HEAD><TITLE>Reactor</TITLE></HEAD>
<BODY>
<!#CLASSDEF
Reactor
#ENDCLASSDEF>
<H1>Reactor</H1>

<P>This class allows user defined input/output systems to be plugged into the
DOPY Hub's select loop.  
<P>This is an abstract base class.  
<H2>Methods</H2>
<UL>
<LI><A HREF="#fileno(self)">fileno(self)</A>
<LI><A HREF="#handleError(self)">handleError(self)</A>
<LI><A HREF="#handleRead(self)">handleRead(self)</A>
<LI><A HREF="#handleWrite(self)">handleWrite(self)</A>
<LI><A HREF="#notifyOnError(self)">notifyOnError(self)</A>
<LI><A HREF="#notifyWhenReadable(self)">notifyWhenReadable(self)</A>
<LI><A HREF="#notifyWhenWritable(self)">notifyWhenWritable(self)</A>
</UL>
<A NAME="fileno">
<A NAME="fileno(self)">
<H3>fileno(self)</H3>
<PRE>
   def fileno(self):
</PRE>

<P>Returns the file number to be used in the select() function to check for
read, write, and error.  i.e.  returns the Reactor's "handle".  
<P>Must be implemented by derived classes.  
<A NAME="handleError">
<A NAME="handleError(self)">
<H3>handleError(self)</H3>
<PRE>
   def handleError(self):
</PRE>

<P>This method will be called when the sslect() loop discovers that the
reactor's handle is in an error state.  
<P>Must be implemented by derived classes.  
<A NAME="handleRead">
<A NAME="handleRead(self)">
<H3>handleRead(self)</H3>
<PRE>
   def handleRead(self):
</PRE>

<P>This method will be called when the select() loop discovers that the
reactor's handle is ready to read.  
<P>Must be implemented by derived classes.  
<A NAME="handleWrite">
<A NAME="handleWrite(self)">
<H3>handleWrite(self)</H3>
<PRE>
   def handleWrite(self):
</PRE>

<P>This method will be called when the sslect() loop discovers that the
reactor's handle is ready to write.  
<P>Must be implemented by derived classes.  
<A NAME="notifyOnError">
<A NAME="notifyOnError(self)">
<H3>notifyOnError(self)</H3>
<PRE>
   def notifyOnError(self):
</PRE>

<P>This method returns true when the Reactor wants to be notified when its
handle has an error condition.  Will cause the handle to be included in the
"error" list of the select().  
<P>Must be implemented by derived classes.  
<A NAME="notifyWhenReadable">
<A NAME="notifyWhenReadable(self)">
<H3>notifyWhenReadable(self)</H3>
<PRE>
   def notifyWhenReadable(self):
</PRE>

<P>This method returns true when the Reactor wants to be notified when its
handle is readable.  Will cause the handle to be included in the "read" list of
the select().  
<P>Must be implemented by derived classes.  
<A NAME="notifyWhenWritable">
<A NAME="notifyWhenWritable(self)">
<H3>notifyWhenWritable(self)</H3>
<PRE>
   def notifyWhenWritable(self):
</PRE>

<P>This method returns true when the Reactor wants to be notified when its
handle is writable.  Will cause the handle to be included in the "write" list of
the select().  
<P>Must be implemented by derived classes.  
</BODY></HTML>
